import tkinter as tk
from tkinter import BooleanVar
from windows.导入其他py用_暂时用不到.file_select_window import FileSelectFrame
from windows.导入其他py用_暂时用不到.func_args_window import FuncArgsFrame


class MainFrame(tk.Frame):
    def __init__(self, master=None, **kwargs):
        super().__init__(master, highlightbackground="grey", highlightthickness=2, **kwargs)
        # 共享变量
        self.args_dict = {}
        self.args_bool = BooleanVar(value=False)
        self.args_bool.trace('w', self.args_bool_event)
        self.file_select = FileSelectFrame(self, args_dict=self.args_dict,
                                           bool=self.args_bool)
        self.func_args = FuncArgsFrame(self, args_dict=self.args_dict)
        self.pack(fill='both')

    def args_bool_event(self,*args):
        self.func_args.args_frame_widget()

if __name__ == '__main__':
    root = tk.Tk()
    root.title("亲情导出")
    root.geometry('600x400')
    mainFrame = MainFrame()
    root.mainloop()

